package queue;

import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {

        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);
        queue.offer(5);
        System.out.println("Queue: " + queue);

        System.out.println("Queuefist: " + queue.peek());
        queue.poll();
        System.out.println("Queue: " + queue);
        //判定队列是否为空
        if(queue.peek()==null){

        }

    }
}
